<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>个人中心</title>
		<script src="../js/mui.min.js"></script>
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="../css/iconfont.css" />
		<link rel="stylesheet" href="../css/style.css" />
		<link rel="stylesheet" href="../css/member.css" />
	</head>

	<body>
		<div class="mui-content">
			<div class="mem_top">
				<div class="mem_infobox clearfix">
					<div class="mem_toux"><img id="touxiang" src="" +AAP.web_root+ "../images/b002.jpg"></div>
					<div class="mem_info">
						<p class="mem_name" id="user_name"></p>
						<p class="mem_name" id="user_level"></p>
					</div>
				</div>
			</div>

			<ul class="mui-table-view mui-grid-view mui-grid-9 mem_indlist" id='shang'>
			</ul>

			<div class="mui-content-padded flogin_btn">

				<button class="mui-btn mui-btn-block login_btn" id="login_out" style="background: #5DD71A;"> 退 出 登 录</button>

			</div>

		</div>
		<div id="footer"></div>
	</body>

</html>
<script type="text/javascript" src="../js/app.js"></script>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/layer/layer.min.js"></script>
<script type="text/javascript">
	get_navigation();
	getFoot(getUrlParam("foot_active") > 0 ? getUrlParam("foot_active") : 4);
</script>
<script>
	$(function() {
		dlpd();
		var member = JSON.parse(localStorage.getItem("member"));
		if(member['nick_name']) {
			var b = "用户名:           " + member['nick_name'];
		} else {
			var b = "用户名:           " + member['account'];
		}

		$("#user_name").text(b);
		if(member['group_id'] == 1) {
			var level = '普通会员';
		}
		if(member['group_id'] == 2) {
			var level = 'vip会员';
		}
		var a = "等级:           " + level;
		$("#user_level").text(a);
		//头像
		if(member['head_img']) {
			$("#touxiang").attr("src", APP.pic_url + member['head_img']);
			//$("#touxiang").html('<img style="width:100px;height:100px;" src="'+APP.pic_url+member['thumb']+'">');
		} else {
			$("#touxiang").attr("src", "../images/head_default.gif");
		}
		var html = "";
		if(member['is_shop'] == '0') {
			html += '<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-xs-4 friends" id="shop">';
			html += '<a href="javascript:shop();"><i class="mui-icon iconfont icon-shengchanzhe"></i><div class="mui-media-body">生产注册</div></a></li>';
			html += '<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-xs-4 friends" id="">';
			html += '<a href="javascript:shiming();"><i class="mui-icon iconfont icon-shimingrenzheng2"></i><div class="mui-media-body">实名认证</div></a></li>';
		}
		if(member['is_shop'] == '1') {
			var html = "";
			html += '<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-xs-4 friends" id="shop">';
			html += '<a href="javascript:shop();"><i class="mui-icon iconfont icon-dianpu"></i><div class="mui-media-body">店铺资料</div></a></li>';
			html += '<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-xs-4 friends" id="">';
			html += '<a href="javascript:order_cart();"><i class="mui-icon iconfont icon-shangpinshuju"></i><div class="mui-media-body">产品数据</div></a></li>';
			if(member['is_jl'] == '1'){
				html += '<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-xs-4 friends" id="">';
				html += '<a href="javascript:serve();"><i class="mui-icon iconfont icon-shangpinshuju"></i><div class="mui-media-body">服务项目</div></a></li>';
				}
			}
			html += '<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-xs-4 friends" id="">';
			html += '<a href="javascript:nongji();"><i class="mui-icon iconfont icon-shangpinshuju"></i><div class="mui-media-body">农机数据</div></a></li>';
			html += '<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-xs-4 friends" id="">';
			html += '<a href="javascript:rc_cart();"><i class="mui-icon iconfont icon-shangpinshuju"></i><div class="mui-media-body">人才数据</div></a></li>';
			html += '<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-xs-4 friends" id="">';
			html += '<a href="javascript:dingyue();"><i class="mui-icon iconfont icon-iconfontzhizuobiaozhun13"></i><div class="mui-media-body">订阅</div></a></li>';
			html += '<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-xs-4 friends" id="">';
			html += '<a href="javascript:about();"><i class="mui-icon iconfont icon-icon071"></i><div class="mui-media-body">关于我们</div></a></li>';
			html += '<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-xs-4 friends" id="">';
			html += '<a href="javascript:fank();"><i class="mui-icon iconfont icon-yijianfankui3"></i><div class="mui-media-body">意见反馈</div></a></li>';
			html += '<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-xs-4 friends" id="">';
			html += '<a href="javascript:xiaoxi();"><i class="mui-icon iconfont icon-xiaoxi"></i><div class="mui-media-body">消息</div></a></li>';
			html += '<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-xs-4 friends" id="shezhi">';
			html += '<a href="javascript:shezhi();"><i class="mui-icon iconfont icon-shezhi1"></i><div class="mui-media-body">资料设置</div></a></li>';
			html += '<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-xs-4 friends" id="xiugai">';
			html += '<a href="javascript:xiugai();"><i class="mui-icon iconfont icon-shezhi1"></i><div class="mui-media-body">修改密码</div></a></li>';
		
			document.getElementById('shang').innerHTML = html;
	});
	//个人资料
	$("#mem_toux").click(function() {
		location.href = "member.html";
	});
	//店铺管理	
	function shop() {
		location.href = "../shop/shopshen.html";
	}
	//产品管理
	function order_cart() {
		location.href = "../goods/spedit.html";
	}
	//服务项目
	function serve() {
		location.href = "../serve/index.html";
	}
	function nongji() {
		location.href = "../nj/nj_cart.html";
	}
	//人才管理
	function rc_cart() {
		location.href = "rc_cart.html";
	}

	//设置
	function shezhi() {
		location.href = "mem_member.html";
	}

	//关于我们

	function about() {
		location.href = "../about.html";
	}
	//意见反馈
	function fank() {
		location.href = "../feedback.html";
	}

	//消息
	function xiaoxi() {
		location.href = "../message_show.html";
	}
	//订阅
	function dingyue() {
		location.href = "dingyue.html";
	}

	//修改密码
	function xiugai() {
		location.href = "../mine_password.html";
	}

	//用户退出
	$("#login_out").click(function() {
		localStorage.removeItem('member');
		location.href = "../login.html";
	});
</script>